package com.itheima.threadtest4;

/**
 * 抢红包
 */
public class ThreadDemo  {

    /**
     * 3 个红包 5 个人抢 金额为 100
     */
    public static void main(String[] args) {

        MyThread thread1 = new MyThread();
        MyThread thread2 = new MyThread();
        MyThread thread3 = new MyThread();
        MyThread thread4 = new MyThread();
        MyThread thread5 = new MyThread();

        thread1.setName("线程1");
        thread2.setName("线程2");
        thread3.setName("线程3");
        thread4.setName("线程4");
        thread5.setName("线程5");


        thread1.start();
        thread2.start();
        thread3.start();
        thread4.start();
        thread5.start();

    }
}
